package b3.widget.mail
{
	import b3.net.ResourceHelper;
	import b3.widget.WidgetManager;
	import b3.widget.basic.BasicButton;
	
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	public class MailSendIcon extends BasicButton
	{
		public function MailSendIcon()
		{
			var IconImg:Class = ResourceHelper.getInstance().getClassByName("ButtonBgr0");
			super(IconImg, "发送邮件");
			this.addEventListener(MouseEvent.CLICK, onMouseClick);
		}
		
		private function onMouseClick(event:Event):void
		{
			var mailDailog:MailDailog = new MailDailog();
			mailDailog.x = -mailDailog.width / 2;
			mailDailog.y = -mailDailog.height / 2;
			WidgetManager.getInstance().popOut([mailDailog], true);
		}
	}
}